package validation;

import dbmanager.DBManager;

public class Isnumericafterfirstchar implements Validation
{

	public String getMessage() 
	{
		return "after first char all char must be numeric";
	}

	public void setDbmanager(DBManager database) 
	{
		
	}

	public boolean validate(String Value) 
	{
		String tempnewstr = Value.substring(1, Value.length());
		System.out.println(tempnewstr);
		Isnumeric isnumeric = new Isnumeric();
		return isnumeric.validate(tempnewstr);
	}

	public boolean validate(String Value, String ConditionValue) 
	{
		return false;
	}

	public boolean validate(String Value, String ConditionValue, String Refvalue) 
	{
	
		if(ConditionValue.equalsIgnoreCase("true"))
		{
			return validate(Value);
		}
		else if(ConditionValue.equalsIgnoreCase("false"))
			return true;
		else
			return false;
	}
	public static void main(String[] args) 
	{
		 Isnumericafterfirstchar is =new Isnumericafterfirstchar();
		 System.out.println(is.validate("+9h1123456"));
		 System.out.println(is.validate("+91123456","false",""));
	}

	public void setBasicvalue(String value) {
		// TODO Auto-generated method stub
		
	}

}
